const { defineConfig } = require('@vue/cli-service')
const AutoImport = require('unplugin-auto-import/webpack')
const Components = require('unplugin-vue-components/webpack')
const { ElementPlusResolver } =
require('unplugin-vue-components/resolvers')
module.exports = defineConfig({
  transpileDependencies: true,
  configureWebpack: {
    plugins: [
      AutoImport({
        resolvers: [ElementPlusResolver()]
      }),
      Components({
        resolvers: [ElementPlusResolver()]
      })
    ]
  },
   devServer: {
      https: true, // 启用 HTTPS
      host: '0.0.0.0', // 或者指定为你的公网 IP
      port: 8080,
      hot: true,
    liveReload: false,
      client: {
      webSocketURL: 'wss://localhost:8080/ws' ,// 设置 WebSocket URL 为 wss
      
    },
    allowedHosts: "all",
    } 
})